package com.jemmyee.pizza.service;

import java.io.Serializable;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jemmyee.core.dao.Page;
import com.jemmyee.pizza.dao.IGasRecordDao;
import com.jemmyee.pizza.entity.GasRecord;

@Service("gasRecordService")
public class GasRecordServiceImpl implements IGasRecordService<GasRecord> {
	
	private static final Log log = LogFactory.getLog(GasRecordServiceImpl.class);

	@Autowired
	private IGasRecordDao gasRecordDao;


	public void delete(GasRecord entity) {
		gasRecordDao.delete(entity);
	}

	public void deleteById(Serializable id) {
		gasRecordDao.deleteById(id);
	}

	public GasRecord findById(Serializable id) {
		return gasRecordDao.findById(id);
	}

	public void save(GasRecord entity) {
		gasRecordDao.save(entity);
	}

	public void update(GasRecord entity) {
		gasRecordDao.update(entity);
	}

	public List<GasRecord> findAll(GasRecord entity) {
		return gasRecordDao.findAll(entity);
	}

	public Page findPageByCriteria(DetachedCriteria detachedCriteria,
			int pageSize, int startIndex,String order) {
		return gasRecordDao.findPageByCriteria(detachedCriteria, pageSize, startIndex, order);
	}

	public List<GasRecord> findByProperty(String propertyName,
			Object value) {
		return gasRecordDao.findByProperty(new GasRecord(), propertyName, value);
	}

	public List<GasRecord> findAll() {
		return gasRecordDao.findAll(new GasRecord());
	}

	public List<GasRecord> findByCriteria(DetachedCriteria criteria) {
		return gasRecordDao.findByCriteria(criteria);
	}

	public void deleteAll(List<GasRecord> list) {
		// TODO Auto-generated method stub
		
	}
}
